package com;

import com.Tokiu.Service.UserServiceIner;
import com.Tokiu.config.SpringConfirguration;

import com.Tokiu.pojo.User;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class App2 {
    /**
     * Spring配置Mybatis
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
        //加载配置文件获取容器对象
        AnnotationConfigApplicationContext ctx=new AnnotationConfigApplicationContext(SpringConfirguration.class);

        UserServiceIner userService = (UserServiceIner) ctx.getBean("UserService");

        List<User> users = userService.selectAll();

        System.out.println(users);

        ctx.close();

    }
}
